package cn.edu.cqvie.atc.stream;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 文件描述
 *
 * @author Zheng Shaohong
 */
public class Test {


    public static void main(String[] args) {
        List<Integer> numbers = Arrays.asList(1, 2, 3, 4);
        String commaSeparatedNumbers = numbers.stream() .map(i -> i.toString()) .collect(Collectors.joining(", "));

        System.out.println(commaSeparatedNumbers);
    }
}
